package com.chinasofti.demo03;

public class Granddad {

    public void drink(){
        System.out.println("爷爷爱喝酒");
    }

}
class Father extends Granddad {
    public void smoke(){
        System.out.println("爸爸爱抽烟");
    }

}
class Son extends Father{
    public void tangt(){
        System.out.println("儿子爱烫头");
    }
    public static void main(String[] args) {
        Son son = new Son();
        son.drink();
        son.smoke();
        son.tangt();
    }
}